Javascript code to convert date to timestamp

This is not everyday that you need a Javascript function to convert the date and time string to UNIX timestamp. But if you do need this like me, then here it is: function covertToUnixTime(yourDate) { //Subtract 1 from month to accomodate the month start from 0 in the function return new Date(yourDate.substring(6, 10), ((yourDate.substring(0, 2) … Continue reading Javascript code to convert date to timestamp